package cn.dm.item.client;

import cn.dm.mapper.DmCinemaMapper;
import cn.dm.pojo.DmCinema;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

@RestController
public class DmCinemaService {
    @Resource
    private DmCinemaMapper dmCinemaMapper;

    @RequestMapping(value = "/getDmCinemaById",method = RequestMethod.POST)
    public DmCinema getDmCinemaById(@RequestParam("id") Long id)throws Exception{
        return dmCinemaMapper.getDmCinemaById(id);
    }

    @RequestMapping(value = "/getDmCinemaListByMap",method = RequestMethod.POST)
    public List<DmCinema> getDmCinemaListByMap(@RequestBody Map<String,Object> param)throws Exception{
        return dmCinemaMapper.getDmCinemaListByMap(param);
    }

    @RequestMapping(value = "/getDmCinemaCountByMap",method = RequestMethod.POST)
    public Integer getDmCinemaCountByMap(@RequestBody Map<String,Object> param)throws Exception{
        return dmCinemaMapper.getDmCinemaCountByMap(param);
    }

    @RequestMapping(value = "/qdtxAddDmCinema",method = RequestMethod.POST)
    public Integer qdtxAddDmCinema(@RequestBody DmCinema dmCinema)throws Exception{
        return dmCinemaMapper.insertDmCinema(dmCinema);
    }

    @RequestMapping(value = "/qdtxModifyDmCinema",method = RequestMethod.POST)
    public Integer qdtxModifyDmCinema(@RequestBody DmCinema dmCinema)throws Exception{
        return dmCinemaMapper.updateDmCinema(dmCinema);
    }
}
